package com.medium.house.repository;

import com.medium.house.entity.HouseLayout;
import com.medium.house.entity.HouseRegion;
import com.medium.house.response.HouseCondition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
@Mapper
public interface HouseLayoutMapper {
    String[] ORDERBY = {"created_at", "updated_at"};
    String[] ORDER = {"desc", "asc"};

    int deleteByPrimaryKey(Long id);

    int insert(HouseLayout record);

    int insertSelective(HouseLayout record);

    HouseLayout selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(HouseLayout record);

    int updateByPrimaryKey(HouseLayout record);

    List<HouseLayout> selectByPage(
            @Param("start") int start,
            @Param("limit") int limit,
            @Param("orderby") String orderby,
            @Param("order") String order,
            @Param("param") Map<String, Object> args);

    List<Long> selectIdsByPage(
            @Param("start") int start,
            @Param("limit") int limit,
            @Param("orderby") String orderby,
            @Param("order") String order,
            @Param("param") Map<String, Object> args);

    long count(@Param("param") Map<String, Object> args);

    List<HouseCondition> selectByCondition(@Param("param") Map<String, Object> args);

}